//+------------------------------------------------------------------+
//|                                                  Candle boxes.mq4|
//|                                                                  |
//|                                                                  |
//+------------------------------------------------------------------+

#property link      ""

#property indicator_chart_window

extern string IIIIIIIIIIIII = "<<< TimeFrame Setting >>>>>>>>>>>";
extern int TF = 1440;
extern string IIIIIIIIIIIIII = "<<< Standard Comments Top/Left >>>>>>>>>>>";
extern bool Show_Comments = FALSE;
extern string IIIIIIIIIIIIIII = "<<< Colored Hi-Lo Comments >>>>>>>>>>>";
extern bool Show_Colored_Text = FALSE;
extern bool Show_Color_Legend = FALSE;
extern string IIIIIIIIIIIIIIII = "<<< Colored Open-Close Comments >>>>>>>>";
extern bool Show_Open_Close_Text = TRUE;
extern bool Show_Open_Close_Legend = FALSE;
extern string IIIIIIIIIIIIIIIIIIIII = "<<< Colored TEXT Settings >>>>>>>>";
extern int Text_Corner = 0;
extern int Shift_Text_UP_DN = 0;
extern int Shift_Text_Sideways = 0;
extern int Text_Size = 8;
extern string IIIIIIIIIIIIIIIII = "<<< Color of Rectangles >>>>>>>>>>>";
extern color Engulfed_col = 36095;
extern color Engulfing_col = 16711680;
extern color Up_col = 798732;
extern color Dn_col = 3080286;
extern color OpenClose_UP = 1;
extern color OpenClose_DN = 16777216;
extern color OpenClose_EQUAL = 16777216;
extern string IIIIIIIIIIIIIIIIII = "<<<< Rectangle/Line Settings >>>>>>>>>>>";
extern bool Show_OPEN_CLOSE = TRUE;
extern bool Show_Pip_Values = TRUE;
extern string IIIIIIIIIIIIIIIIIII = "<<< Shows Previous Rectangle >>>";
extern bool Display_Prev_Hour = TRUE;
extern string IIIIIIIIIIIIIIIIIIII = "<<< Shows 7 previous Rectangles >>>";
extern bool Display_Prev_Hours = TRUE;
extern string Rectangle_No1 = "----------------------------------------------------";
extern int Line_Width = 2;
extern int Line_Style = 0;
extern string Rectangle_No2 = "----------------------------------------------------";
extern int Line_Width2 = 0;
extern int Line_Style2 = 0;
extern string Rectangle_No3 = "----------------------------------------------------";
extern int Line_Width3 = 0;
extern int Line_Style3 = 0;
extern string Rectangle_No4 = "----------------------------------------------------";
extern int Line_Width4 = 0;
extern int Line_Style4 = 0;
extern string Rectangle_No5 = "----------------------------------------------------";
extern int Line_Width5 = 0;
extern int Line_Style5 = 0;
extern string Rectangle_No6 = "----------------------------------------------------";
extern int Line_Width6 = 0;
extern int Line_Style6 = 0;
extern string Rectangle_No7 = "----------------------------------------------------";
extern int Line_Width7 = 0;
extern int Line_Style7 = 0;

int init() {
   IndicatorShortName("HI-LOW OPEN_CLOSE CANDLES");
   return (0);
}

int deinit() {
   ObjectDelete("Title");
   ObjectDelete("CURH");
   ObjectDelete("PREH");
   ObjectDelete("PREH1");
   ObjectDelete("PREH2");
   ObjectDelete("PREH3");
   ObjectDelete("PREH4");
   ObjectDelete("PREH5");
   ObjectDelete("OPENCLOSE");
   ObjectDelete("OPENCLOSE2");
   ObjectDelete("OPENCLOSE3");
   ObjectDelete("OPENCLOSE4");
   ObjectDelete("OPENCLOSE5");
   ObjectDelete("OPENCLOSE6");
   ObjectDelete("OPENCLOSE7");
   ObjectDelete("HiLo");
   ObjectDelete("HiLo1");
   ObjectDelete("HiLo2");
   ObjectDelete("HiLo3");
   ObjectDelete("HiLo4");
   ObjectDelete("HiLo5");
   ObjectDelete("HiLo6");
   ObjectDelete("HiLo7");
   ObjectDelete("HiLo8");
   ObjectDelete("HiLo9");
   ObjectDelete("HiLo10");
   ObjectDelete("HiLo11");
   ObjectDelete("HiLo12");
   ObjectDelete("HiLo13");
   ObjectDelete("HiLoLegend");
   ObjectDelete("OpnClos");
   ObjectDelete("OpnClos1");
   ObjectDelete("OpnClos2");
   ObjectDelete("OpnClos3");
   ObjectDelete("OpnClos4");
   ObjectDelete("OpnClos5");
   ObjectDelete("OpnClos6");
   ObjectDelete("OpnClos7");
   ObjectDelete("OpnClos8");
   ObjectDelete("OpnClos9");
   ObjectDelete("OpnClos10");
   ObjectDelete("OpnClos11");
   ObjectDelete("OpnClos12");
   ObjectDelete("HL_Pips");
   ObjectDelete("HL_Pips1");
   ObjectDelete("HL_Pips2");
   ObjectDelete("HL_Pips3");
   ObjectDelete("HL_Pips4");
   ObjectDelete("HL_Pips5");
   ObjectDelete("HL_Pips6");
   ObjectDelete("HL_Pips7");
   ObjectDelete("Title");
   return (0);
}

int start() {
   int l_ind_counted_0 = IndicatorCounted();
   CreateCH();
   return (0);
}

void CreateCurrentHour(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 0), a_price_8, Time[0], a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, FALSE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style);
}

void DeleteCreateCurrentHour() {
   ObjectDelete("CURH");
}

void CreateCH() {
   DeleteCreateCurrentHour();
   CreateCHOC();
}

void CreateCurrentHourOC(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 0), a_price_8, Time[0], a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style);
}

void DeleteCreateCurrentHourOC() {
   ObjectDelete("OPENCLOSE");
}

void CreateCHOC() {
   DeleteCreateCurrentHourOC();
   CreatePH();
}

void CreatePreviousHour(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 1), a_price_8, iTime(NULL, TF, 0), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, FALSE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width2);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style2);
}

void DeleteCreatePreviousHour() {
   ObjectDelete("PREH");
}

void CreatePH() {
   DeleteCreatePreviousHour();
   CreatePHOC();
}

void CreatePreviousHourOC(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 1), a_price_8, iTime(NULL, TF, 0), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width2);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style2);
}

void DeleteCreatePreviousHourOC() {
   ObjectDelete("OPENCLOSE2");
}

void CreatePHOC() {
   DeleteCreatePreviousHourOC();
   CreatePH3();
}

void CreatePreviousHour3(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 2), a_price_8, iTime(NULL, TF, 1), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, FALSE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width3);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style3);
}

void DeleteCreatePreviousHour3() {
   ObjectDelete("PREH1");
}

void CreatePH3() {
   DeleteCreatePreviousHour3();
   CreatePH3OC();
}

void CreatePreviousHour3OC(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 2), a_price_8, iTime(NULL, TF, 1), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width3);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style3);
}

void DeleteCreatePreviousHour3OC() {
   ObjectDelete("OPENCLOSE3");
}

void CreatePH3OC() {
   DeleteCreatePreviousHour3OC();
   CreatePH4();
}

void CreatePreviousHour4(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 3), a_price_8, iTime(NULL, TF, 2), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, FALSE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width4);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style4);
}

void DeleteCreatePreviousHour4() {
   ObjectDelete("PREH2");
}

void CreatePH4() {
   DeleteCreatePreviousHour4();
   CreatePH4OC();
}

void CreatePreviousHour4OC(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 3), a_price_8, iTime(NULL, TF, 2), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width4);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style4);
}

void DeleteCreatePreviousHour4OC() {
   ObjectDelete("OPENCLOSE4");
}

void CreatePH4OC() {
   DeleteCreatePreviousHour4OC();
   CreatePH5();
}

void CreatePreviousHour5(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 4), a_price_8, iTime(NULL, TF, 3), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, FALSE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width5);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style5);
}

void DeleteCreatePreviousHour5() {
   ObjectDelete("PREH3");
}

void CreatePH5() {
   DeleteCreatePreviousHour5();
   CreatePH5OC();
}

void CreatePreviousHour5OC(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 4), a_price_8, iTime(NULL, TF, 3), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width5);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style5);
}

void DeleteCreatePreviousHour5OC() {
   ObjectDelete("OPENCLOSE5");
}

void CreatePH5OC() {
   DeleteCreatePreviousHour5OC();
   CreatePH6();
}

void CreatePreviousHour6(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 5), a_price_8, iTime(NULL, TF, 4), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, FALSE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width6);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style6);
}

void DeleteCreatePreviousHour6() {
   ObjectDelete("PREH4");
}

void CreatePH6() {
   DeleteCreatePreviousHour6();
   CreatePH6OC();
}

void CreatePreviousHour6OC(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 5), a_price_8, iTime(NULL, TF, 4), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width6);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style6);
}

void DeleteCreatePreviousHour6OC() {
   ObjectDelete("OPENCLOSE6");
}

void CreatePH6OC() {
   DeleteCreatePreviousHour6OC();
   CreatePH7();
}

void CreatePreviousHour7(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 6), a_price_8, iTime(NULL, TF, 5), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, FALSE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width7);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style7);
}

void DeleteCreatePreviousHour7() {
   ObjectDelete("PREH5");
}

void CreatePH7() {
   DeleteCreatePreviousHour7();
   CreatePH7OC();
}

void CreatePreviousHour7OC(string a_name_0, double a_price_8, double a_price_16, color a_color_24) {
   ObjectCreate(a_name_0, OBJ_RECTANGLE, 0, iTime(NULL, TF, 6), a_price_8, iTime(NULL, TF, 5), a_price_16);
   ObjectSet(a_name_0, OBJPROP_COLOR, a_color_24);
   ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
   ObjectSet(a_name_0, OBJPROP_WIDTH, Line_Width7);
   ObjectSet(a_name_0, OBJPROP_STYLE, Line_Style7);
}

void DeleteCreatePreviousHour7OC() {
   ObjectDelete("OPENCLOSE7");
}

void CreatePH7OC() {
   color l_color_372;
   DeleteCreatePreviousHour7OC();
   string ls_0 = "";
   if (TF < PERIOD_M1) ls_0 = "Curr T/Frame";
   if (TF == PERIOD_M1) ls_0 = "Period M1";
   if (TF == PERIOD_M5) ls_0 = "Period M5";
   if (TF == PERIOD_M15) ls_0 = "Period M15";
   if (TF == PERIOD_M30) ls_0 = "Period M30";
   if (TF == PERIOD_H1) ls_0 = "Period H1";
   if (TF == PERIOD_H4) ls_0 = "Period H4";
   if (TF == PERIOD_D1) ls_0 = "Period Daily";
   if (TF == PERIOD_W1) ls_0 = "Period Weekly";
   if (TF == PERIOD_MN1) ls_0 = "Period Monthly";
   double l_ihigh_8 = iHigh(NULL, TF, 0);
   double l_ilow_16 = iLow(NULL, TF, 0);
   double l_ihigh_24 = iHigh(NULL, TF, 1);
   double l_ilow_32 = iLow(NULL, TF, 1);
   double l_ihigh_40 = iHigh(NULL, TF, 2);
   double l_ilow_48 = iLow(NULL, TF, 2);
   double l_ihigh_56 = iHigh(NULL, TF, 3);
   double l_ilow_64 = iLow(NULL, TF, 3);
   double l_ihigh_72 = iHigh(NULL, TF, 4);
   double l_ilow_80 = iLow(NULL, TF, 4);
   double l_ihigh_88 = iHigh(NULL, TF, 5);
   double l_ilow_96 = iLow(NULL, TF, 5);
   double l_ihigh_104 = iHigh(NULL, TF, 6);
   double l_ilow_112 = iLow(NULL, TF, 6);
   double l_ihigh_120 = iHigh(NULL, TF, 7);
   double l_ilow_128 = iLow(NULL, TF, 7);
   double l_iopen_136 = iOpen(NULL, TF, 0);
   double l_iclose_144 = iClose(NULL, TF, 0);
   double l_iopen_152 = iOpen(NULL, TF, 1);
   double l_iclose_160 = iClose(NULL, TF, 1);
   double l_iopen_168 = iOpen(NULL, TF, 2);
   double l_iclose_176 = iClose(NULL, TF, 2);
   double l_iopen_184 = iOpen(NULL, TF, 3);
   double l_iclose_192 = iClose(NULL, TF, 3);
   double l_iopen_200 = iOpen(NULL, TF, 4);
   double l_iclose_208 = iClose(NULL, TF, 4);
   double l_iopen_216 = iOpen(NULL, TF, 5);
   double l_iclose_224 = iClose(NULL, TF, 5);
   double l_iopen_232 = iOpen(NULL, TF, 6);
   double l_iclose_240 = iClose(NULL, TF, 6);
   double l_iopen_248 = iOpen(NULL, TF, 7);
   double l_iclose_256 = iClose(NULL, TF, 7);
   if (Show_Comments == TRUE) {
      Comment("" 
         + "\n" 
         + "        Previous High Lows    Total Pips" 
         + "\n" 
         + "#7  High " + DoubleToStr(l_ihigh_104, Digits) + "  &  " + "Low " + DoubleToStr(l_ilow_112, Digits) + "    " + DoubleToStr((l_ihigh_104 - l_ilow_112) / Point, 0) 
         + "\n" 
         + "#6  High " + DoubleToStr(l_ihigh_88, Digits) + "  &  " + "Low " + DoubleToStr(l_ilow_96, Digits) + "    " + DoubleToStr((l_ihigh_88 - l_ilow_96) / Point, 0) 
         + "\n" 
         + "#5  High " + DoubleToStr(l_ihigh_72, Digits) + "  &  " + "Low " + DoubleToStr(l_ilow_80, Digits) + "    " + DoubleToStr((l_ihigh_72 - l_ilow_80) / Point, 0) 
         + "\n" 
         + "#4  High " + DoubleToStr(l_ihigh_56, Digits) + "  &  " + "Low " + DoubleToStr(l_ilow_64, Digits) + "    " + DoubleToStr((l_ihigh_56 - l_ilow_64) / Point, 0) 
         + "\n" 
         + "#3  High " + DoubleToStr(l_ihigh_40, Digits) + "  &  " + "Low " + DoubleToStr(l_ilow_48, Digits) + "    " + DoubleToStr((l_ihigh_40 - l_ilow_48) / Point, 0) 
         + "\n" 
         + "#2  High " + DoubleToStr(l_ihigh_24, Digits) + "  &  " + "Low " + DoubleToStr(l_ilow_32, Digits) + "    " + DoubleToStr((l_ihigh_24 - l_ilow_32) / Point, 0) 
         + "\n" 
         + "        Current High Low" 
         + "\n" 
         + "#1  High " + DoubleToStr(l_ihigh_8, Digits) + "  &  " + "Low " + DoubleToStr(l_ilow_16, Digits) + "    " + DoubleToStr((l_ihigh_8 - l_ilow_16) / Point, 0) 
         + "\n" 
      + "      TimeFrame = " + ls_0 + "");
   }
   string ls_unused_264 = "";
   string ls_unused_272 = "";
   string ls_unused_280 = "";
   string ls_unused_288 = "";
   string ls_unused_296 = "";
   string ls_unused_304 = "";
   string ls_unused_312 = "";
   double l_bid_348 = Bid;
   double l_ima_356 = iMA(Symbol(), 0, 1, 0, MODE_EMA, PRICE_CLOSE, 1);
   string ls_unused_364 = "";
   if (l_ima_356 > l_bid_348) {
      ls_unused_364 = "";
      l_color_372 = Red;
   }
   if (l_ima_356 < l_bid_348) {
      ls_unused_364 = "";
      l_color_372 = Lime;
   }
   if (l_ima_356 == l_bid_348) {
      ls_unused_364 = "";
      l_color_372 = Gray;
   }
   ObjectDelete("Title");
   if (ObjectFind("Title") != 0) {
      ObjectCreate("Title", OBJ_TEXT, 0, Time[0], Bid);
      ObjectSetText("Title", "                                          < TF " + DoubleToStr(TF, Digits - 4) + "  @  " + DoubleToStr(l_bid_348, Digits) + "", 10, "Arial Narrow", l_color_372);
   } else ObjectMove("Title", 0, Time[0], Bid);
   ls_unused_264 = "";
   color l_color_320 = Engulfed_col;
   if (l_ihigh_8 > l_ihigh_24) {
      ls_unused_264 = "";
      l_color_320 = Up_col;
   }
   if (l_ilow_16 < l_ilow_32) {
      ls_unused_264 = "";
      l_color_320 = Dn_col;
   }
   if (l_ilow_16 < l_ilow_32 && l_ihigh_8 > l_ihigh_24) {
      ls_unused_264 = "";
      l_color_320 = Engulfing_col;
   }
   ls_unused_272 = "";
   color l_color_324 = Engulfed_col;
   if (l_ihigh_24 > l_ihigh_40) {
      ls_unused_272 = "";
      l_color_324 = Up_col;
   }
   if (l_ilow_32 < l_ilow_48) {
      ls_unused_272 = "";
      l_color_324 = Dn_col;
   }
   if (l_ilow_32 < l_ilow_48 && l_ihigh_24 > l_ihigh_40) {
      ls_unused_272 = "";
      l_color_324 = Engulfing_col;
   }
   ls_unused_280 = "";
   color l_color_328 = Engulfed_col;
   if (l_ihigh_40 > l_ihigh_56) {
      ls_unused_280 = "";
      l_color_328 = Up_col;
   }
   if (l_ilow_48 < l_ilow_64) {
      ls_unused_280 = "";
      l_color_328 = Dn_col;
   }
   if (l_ilow_48 < l_ilow_64 && l_ihigh_40 > l_ihigh_56) {
      ls_unused_280 = "";
      l_color_328 = Engulfing_col;
   }
   ls_unused_288 = "";
   color l_color_332 = Engulfed_col;
   if (l_ihigh_56 > l_ihigh_72) {
      ls_unused_288 = "";
      l_color_332 = Up_col;
   }
   if (l_ilow_64 < l_ilow_80) {
      ls_unused_288 = "";
      l_color_332 = Dn_col;
   }
   if (l_ilow_64 < l_ilow_80 && l_ihigh_56 > l_ihigh_72) {
      ls_unused_288 = "";
      l_color_332 = Engulfing_col;
   }
   ls_unused_296 = "";
   color l_color_336 = Engulfed_col;
   if (l_ihigh_72 > l_ihigh_88) {
      ls_unused_296 = "";
      l_color_336 = Up_col;
   }
   if (l_ilow_80 < l_ilow_96) {
      ls_unused_296 = "";
      l_color_336 = Dn_col;
   }
   if (l_ilow_80 < l_ilow_96 && l_ihigh_72 > l_ihigh_88) {
      ls_unused_296 = "";
      l_color_336 = Engulfing_col;
   }
   ls_unused_304 = "";
   color l_color_340 = Engulfed_col;
   if (l_ihigh_88 > l_ihigh_104) {
      ls_unused_304 = "";
      l_color_340 = Up_col;
   }
   if (l_ilow_96 < l_ilow_112) {
      ls_unused_304 = "";
      l_color_340 = Dn_col;
   }
   if (l_ilow_96 < l_ilow_112 && l_ihigh_88 > l_ihigh_104) {
      ls_unused_304 = "";
      l_color_340 = Engulfing_col;
   }
   ls_unused_312 = "";
   color l_color_344 = Engulfed_col;
   if (l_ihigh_104 > l_ihigh_120) {
      ls_unused_312 = "";
      l_color_344 = Up_col;
   }
   if (l_ilow_112 < l_ilow_128) {
      ls_unused_312 = "";
      l_color_344 = Dn_col;
   }
   if (l_ilow_112 < l_ilow_128 && l_ihigh_104 > l_ihigh_120) {
      ls_unused_312 = "";
      l_color_344 = Engulfing_col;
   }
   CreateCurrentHour("CURH", l_ihigh_8, l_ilow_16, l_color_320);
   if (Display_Prev_Hour == TRUE) CreatePreviousHour("PREH", l_ihigh_24, l_ilow_32, l_color_324);
   if (Display_Prev_Hours == TRUE) {
      CreatePreviousHour3("PREH1", l_ihigh_40, l_ilow_48, l_color_328);
      CreatePreviousHour4("PREH2", l_ihigh_56, l_ilow_64, l_color_332);
      CreatePreviousHour5("PREH3", l_ihigh_72, l_ilow_80, l_color_336);
      CreatePreviousHour6("PREH4", l_ihigh_88, l_ilow_96, l_color_340);
      CreatePreviousHour7("PREH5", l_ihigh_104, l_ilow_112, l_color_344);
   }
   string ls_unused_376 = "";
   string ls_unused_384 = "";
   string ls_unused_392 = "";
   string ls_unused_400 = "";
   string ls_unused_408 = "";
   string ls_unused_416 = "";
   string ls_unused_424 = "";
   ls_unused_376 = "";
   int l_color_432 = OpenClose_EQUAL;
   if (l_iopen_136 > l_iclose_144) {
      ls_unused_376 = "";
      l_color_432 = OpenClose_DN;
   }
   if (l_iopen_136 < l_iclose_144) {
      ls_unused_376 = "";
      l_color_432 = OpenClose_UP;
   }
   ls_unused_384 = "";
   int l_color_436 = OpenClose_EQUAL;
   if (l_iopen_152 > l_iclose_160) {
      ls_unused_384 = "";
      l_color_436 = OpenClose_DN;
   }
   if (l_iopen_152 < l_iclose_160) {
      ls_unused_384 = "";
      l_color_436 = OpenClose_UP;
   }
   ls_unused_392 = "";
   int l_color_440 = OpenClose_EQUAL;
   if (l_iopen_168 > l_iclose_176) {
      ls_unused_392 = "";
      l_color_440 = OpenClose_DN;
   }
   if (l_iopen_168 < l_iclose_176) {
      ls_unused_392 = "";
      l_color_440 = OpenClose_UP;
   }
   ls_unused_400 = "";
   int l_color_444 = OpenClose_EQUAL;
   if (l_iopen_184 > l_iclose_192) {
      ls_unused_400 = "";
      l_color_444 = OpenClose_DN;
   }
   if (l_iopen_184 < l_iclose_192) {
      ls_unused_400 = "";
      l_color_444 = OpenClose_UP;
   }
   ls_unused_408 = "";
   int l_color_448 = OpenClose_EQUAL;
   if (l_iopen_200 > l_iclose_208) {
      ls_unused_408 = "";
      l_color_448 = OpenClose_DN;
   }
   if (l_iopen_200 < l_iclose_208) {
      ls_unused_408 = "";
      l_color_448 = OpenClose_UP;
   }
   ls_unused_416 = "";
   int l_color_452 = OpenClose_EQUAL;
   if (l_iopen_216 > l_iclose_224) {
      ls_unused_416 = "";
      l_color_452 = OpenClose_DN;
   }
   if (l_iopen_216 < l_iclose_224) {
      ls_unused_416 = "";
      l_color_452 = OpenClose_UP;
   }
   ls_unused_424 = "";
   int l_color_456 = OpenClose_EQUAL;
   if (l_iopen_232 > l_iclose_240) {
      ls_unused_424 = "";
      l_color_456 = OpenClose_DN;
   }
   if (l_iopen_232 < l_iclose_240) {
      ls_unused_424 = "";
      l_color_456 = OpenClose_UP;
   }
   if (Show_OPEN_CLOSE == TRUE) {
      CreateCurrentHourOC("OPENCLOSE", l_iopen_136, l_iclose_144, l_color_432);
      CreatePreviousHourOC("OPENCLOSE2", l_iopen_152, l_iclose_160, l_color_436);
      CreatePreviousHour3OC("OPENCLOSE3", l_iopen_168, l_iclose_176, l_color_440);
      CreatePreviousHour4OC("OPENCLOSE4", l_iopen_184, l_iclose_192, l_color_444);
      CreatePreviousHour5OC("OPENCLOSE5", l_iopen_200, l_iclose_208, l_color_448);
      CreatePreviousHour6OC("OPENCLOSE6", l_iopen_216, l_iclose_224, l_color_452);
      CreatePreviousHour7OC("OPENCLOSE7", l_iopen_232, l_iclose_240, l_color_456);
   }
   ObjectCreate("HiLo_cja", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("HiLo_cja", "cja", Text_Size, "Tahoma", DarkSlateGray);
   ObjectSet("HiLo_cja", OBJPROP_CORNER, Text_Corner);
   ObjectSet("HiLo_cja", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
   ObjectSet("HiLo_cja", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 20) * Text_Size / 9);
   if (Show_Colored_Text == TRUE) {
      ObjectCreate("HiLo", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("HiLo", "      Previous High Lows        Total Pips", Text_Size, "Tahoma", Gray);
      ObjectSet("HiLo", OBJPROP_CORNER, Text_Corner);
      ObjectSet("HiLo", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
      ObjectSet("HiLo", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 20) * Text_Size / 9);
      ObjectCreate("HiLo1", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("HiLo1", "#7  High " + DoubleToStr(l_ihigh_104, Digits) + "  &   Low " + DoubleToStr(l_ilow_112, Digits) + "    " + DoubleToStr((l_ihigh_104 - l_ilow_112) / Point, 0) +
         "", Text_Size, "Tahoma", l_color_344);
      ObjectSet("HiLo1", OBJPROP_CORNER, Text_Corner);
      ObjectSet("HiLo1", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
      ObjectSet("HiLo1", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 34) * Text_Size / 9);
      ObjectCreate("HiLo2", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("HiLo2", "#6  High " + DoubleToStr(l_ihigh_88, Digits) + "  &   Low " + DoubleToStr(l_ilow_96, Digits) + "    " + DoubleToStr((l_ihigh_88 - l_ilow_96) / Point, 0) +
         "", Text_Size, "Tahoma", l_color_340);
      ObjectSet("HiLo2", OBJPROP_CORNER, Text_Corner);
      ObjectSet("HiLo2", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
      ObjectSet("HiLo2", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 48) * Text_Size / 9);
      ObjectCreate("HiLo3", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("HiLo3", "#5  High " + DoubleToStr(l_ihigh_72, Digits) + "  &   Low " + DoubleToStr(l_ilow_80, Digits) + "    " + DoubleToStr((l_ihigh_72 - l_ilow_80) / Point, 0) +
         "", Text_Size, "Tahoma", l_color_336);
      ObjectSet("HiLo3", OBJPROP_CORNER, Text_Corner);
      ObjectSet("HiLo3", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
      ObjectSet("HiLo3", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 62) * Text_Size / 9);
      ObjectCreate("HiLo4", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("HiLo4", "#4  High " + DoubleToStr(l_ihigh_56, Digits) + "  &   Low " + DoubleToStr(l_ilow_64, Digits) + "    " + DoubleToStr((l_ihigh_56 - l_ilow_64) / Point, 0) +
         "", Text_Size, "Tahoma", l_color_332);
      ObjectSet("HiLo4", OBJPROP_CORNER, Text_Corner);
      ObjectSet("HiLo4", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
      ObjectSet("HiLo4", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 76) * Text_Size / 9);
      ObjectCreate("HiLo5", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("HiLo5", "#3  High " + DoubleToStr(l_ihigh_40, Digits) + "  &   Low " + DoubleToStr(l_ilow_16, Digits) + "    " + DoubleToStr((l_ihigh_40 - l_ilow_48) / Point, 0) +
         "", Text_Size, "Tahoma", l_color_328);
      ObjectSet("HiLo5", OBJPROP_CORNER, Text_Corner);
      ObjectSet("HiLo5", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
      ObjectSet("HiLo5", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 90) * Text_Size / 9);
      ObjectCreate("HiLo6", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("HiLo6", "#2  High " + DoubleToStr(l_ihigh_24, Digits) + "  &   Low " + DoubleToStr(l_ilow_32, Digits) + "    " + DoubleToStr((l_ihigh_24 - l_ilow_32) / Point, 0) +
         "", Text_Size, "Tahoma", l_color_324);
      ObjectSet("HiLo6", OBJPROP_CORNER, Text_Corner);
      ObjectSet("HiLo6", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
      ObjectSet("HiLo6", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 104) * Text_Size / 9);
      ObjectCreate("HiLo7", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("HiLo7", "      Current High Low", Text_Size, "Tahoma", Gray);
      ObjectSet("HiLo7", OBJPROP_CORNER, Text_Corner);
      ObjectSet("HiLo7", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
      ObjectSet("HiLo7", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 117) * Text_Size / 9);
      ObjectCreate("HiLo8", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("HiLo8", "#1  High " + DoubleToStr(l_ihigh_8, Digits) + "  &   Low " + DoubleToStr(l_ilow_16, Digits) + "    " + DoubleToStr((l_ihigh_8 - l_ilow_16) / Point, 0) +
         "", Text_Size, "Tahoma", l_color_320);
      ObjectSet("HiLo8", OBJPROP_CORNER, Text_Corner);
      ObjectSet("HiLo8", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
      ObjectSet("HiLo8", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 131) * Text_Size / 9);
      ObjectCreate("HiLo9", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("HiLo9", "      TimeFrame = " + ls_0 + "", Text_Size, "Tahoma", l_color_320);
      ObjectSet("HiLo9", OBJPROP_CORNER, Text_Corner);
      ObjectSet("HiLo9", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
      ObjectSet("HiLo9", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 148) * Text_Size / 9);
      if (Show_Color_Legend == TRUE) {
         ObjectCreate("HiLoLegend", OBJ_LABEL, 0, 0, 0);
         ObjectSetText("HiLoLegend", "      Color Legend ", Text_Size, "Tahoma", Gray);
         ObjectSet("HiLoLegend", OBJPROP_CORNER, Text_Corner);
         ObjectSet("HiLoLegend", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
         ObjectSet("HiLoLegend", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 164) * Text_Size / 9);
         ObjectCreate("HiLo10", OBJ_LABEL, 0, 0, 0);
         ObjectSetText("HiLo10", "      Engulfing Candle ", Text_Size, "Tahoma", Engulfing_col);
         ObjectSet("HiLo10", OBJPROP_CORNER, Text_Corner);
         ObjectSet("HiLo10", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
         ObjectSet("HiLo10", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 178) * Text_Size / 9);
         ObjectCreate("HiLo11", OBJ_LABEL, 0, 0, 0);
         ObjectSetText("HiLo11", "      Engulfed Candle ", Text_Size, "Tahoma", Engulfed_col);
         ObjectSet("HiLo11", OBJPROP_CORNER, Text_Corner);
         ObjectSet("HiLo11", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
         ObjectSet("HiLo11", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 190) * Text_Size / 9);
         ObjectCreate("HiLo12", OBJ_LABEL, 0, 0, 0);
         ObjectSetText("HiLo12", "      Lower Candle ", Text_Size, "Tahoma", Dn_col);
         ObjectSet("HiLo12", OBJPROP_CORNER, Text_Corner);
         ObjectSet("HiLo12", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
         ObjectSet("HiLo12", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 202) * Text_Size / 9);
         ObjectCreate("HiLo13", OBJ_LABEL, 0, 0, 0);
         ObjectSetText("HiLo13", "      Higher Candle ", Text_Size, "Tahoma", Up_col);
         ObjectSet("HiLo13", OBJPROP_CORNER, Text_Corner);
         ObjectSet("HiLo13", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
         ObjectSet("HiLo13", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 214) * Text_Size / 9);
      }
      if (Show_OPEN_CLOSE == TRUE) {
         if (Show_Open_Close_Text == TRUE) {
            if (Show_Color_Legend == TRUE) {
               ObjectCreate("OpnClos", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos", "      Open                Close", Text_Size, "Tahoma", Gray);
               ObjectSet("OpnClos", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 234) * Text_Size / 9);
               ObjectCreate("OpnClos1", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos1", "#7 Open " + DoubleToStr(l_iopen_232, Digits) + "  &  Close  " + DoubleToStr(l_iclose_240, Digits) + "   " + DoubleToStr((l_iclose_240 - l_iopen_232) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_456);
               ObjectSet("OpnClos1", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos1", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos1", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 246) * Text_Size / 9);
               ObjectCreate("OpnClos2", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos2", "#6 Open " + DoubleToStr(l_iopen_216, Digits) + "  &  Close  " + DoubleToStr(l_iclose_224, Digits) + "   " + DoubleToStr((l_iclose_224 - l_iopen_216) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_452);
               ObjectSet("OpnClos2", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos2", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos2", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 258) * Text_Size / 9);
               ObjectCreate("OpnClos3", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos3", "#5 Open " + DoubleToStr(l_iopen_200, Digits) + "  &  Close  " + DoubleToStr(l_iclose_208, Digits) + "   " + DoubleToStr((l_iclose_208 - l_iopen_200) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_448);
               ObjectSet("OpnClos3", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos3", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos3", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 270) * Text_Size / 9);
               ObjectCreate("OpnClos4", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos4", "#4 Open " + DoubleToStr(l_iopen_184, Digits) + "  &  Close  " + DoubleToStr(l_iclose_192, Digits) + "   " + DoubleToStr((l_iclose_192 - l_iopen_184) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_444);
               ObjectSet("OpnClos4", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos4", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos4", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 282) * Text_Size / 9);
               ObjectCreate("OpnClos5", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos5", "#3 Open " + DoubleToStr(l_iopen_168, Digits) + "  &  Close  " + DoubleToStr(l_iclose_176, Digits) + "   " + DoubleToStr((l_iclose_176 - l_iopen_168) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_440);
               ObjectSet("OpnClos5", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos5", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos5", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 294) * Text_Size / 9);
               ObjectCreate("OpnClos6", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos6", "#2 Open " + DoubleToStr(l_iopen_152, Digits) + "  &  Close  " + DoubleToStr(l_iclose_160, Digits) + "   " + DoubleToStr((l_iclose_160 - l_iopen_152) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_436);
               ObjectSet("OpnClos6", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos6", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos6", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 306) * Text_Size / 9);
               ObjectCreate("OpnClos7", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos7", "     Current Open Close", Text_Size, "Tahoma", Gray);
               ObjectSet("OpnClos7", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos7", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos7", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 320) * Text_Size / 9);
               ObjectCreate("OpnClos8", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos8", "#1 Open " + DoubleToStr(l_iopen_136, Digits) + "  &  Close  " + DoubleToStr(l_iclose_144, Digits) + "   " + DoubleToStr((l_iclose_144 - l_iopen_136) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_432);
               ObjectSet("OpnClos8", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos8", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos8", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 332) * Text_Size / 9);
               if (Show_Open_Close_Legend == TRUE) {
                  ObjectCreate("OpnClos9", OBJ_LABEL, 0, 0, 0);
                  ObjectSetText("OpnClos9", "     Color Legend", Text_Size, "Tahoma", Gray);
                  ObjectSet("OpnClos9", OBJPROP_CORNER, Text_Corner);
                  ObjectSet("OpnClos9", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
                  ObjectSet("OpnClos9", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 348) * Text_Size / 9);
                  ObjectCreate("OpnClos10", OBJ_LABEL, 0, 0, 0);
                  ObjectSetText("OpnClos10", "     Open > Close", Text_Size, "Tahoma", 3 * OpenClose_UP);
                  ObjectSet("OpnClos10", OBJPROP_CORNER, Text_Corner);
                  ObjectSet("OpnClos10", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
                  ObjectSet("OpnClos10", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 360) * Text_Size / 9);
                  ObjectCreate("OpnClos11", OBJ_LABEL, 0, 0, 0);
                  ObjectSetText("OpnClos11", "     Open < Close", Text_Size, "Tahoma", 3 * OpenClose_DN);
                  ObjectSet("OpnClos11", OBJPROP_CORNER, Text_Corner);
                  ObjectSet("OpnClos11", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
                  ObjectSet("OpnClos11", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 372) * Text_Size / 9);
                  ObjectCreate("OpnClos12", OBJ_LABEL, 0, 0, 0);
                  ObjectSetText("OpnClos12", "     Open = Close", Text_Size, "Tahoma", 3 * OpenClose_EQUAL);
                  ObjectSet("OpnClos12", OBJPROP_CORNER, Text_Corner);
                  ObjectSet("OpnClos12", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
                  ObjectSet("OpnClos12", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 384) * Text_Size / 9);
               }
            }
         }
      }
      if (Show_OPEN_CLOSE == TRUE) {
         if (Show_Open_Close_Text == TRUE) {
            if (Show_Color_Legend == FALSE) {
               ObjectCreate("OpnClos", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos", "      Open                Close", Text_Size, "Tahoma", Gray);
               ObjectSet("OpnClos", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 164) * Text_Size / 9);
               ObjectCreate("OpnClos1", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos1", "#7 Open " + DoubleToStr(l_iopen_232, Digits) + "  &  Close  " + DoubleToStr(l_iclose_240, Digits) + "   " + DoubleToStr((l_iclose_240 - l_iopen_232) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_456);
               ObjectSet("OpnClos1", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos1", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos1", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 176) * Text_Size / 9);
               ObjectCreate("OpnClos2", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos2", "#6 Open " + DoubleToStr(l_iopen_216, Digits) + "  &  Close  " + DoubleToStr(l_iclose_224, Digits) + "   " + DoubleToStr((l_iclose_224 - l_iopen_216) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_452);
               ObjectSet("OpnClos2", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos2", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos2", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 188) * Text_Size / 9);
               ObjectCreate("OpnClos3", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos3", "#5 Open " + DoubleToStr(l_iopen_200, Digits) + "  &  Close  " + DoubleToStr(l_iclose_208, Digits) + "   " + DoubleToStr((l_iclose_208 - l_iopen_200) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_448);
               ObjectSet("OpnClos3", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos3", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos3", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 200) * Text_Size / 9);
               ObjectCreate("OpnClos4", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos4", "#4 Open " + DoubleToStr(l_iopen_184, Digits) + "  &  Close  " + DoubleToStr(l_iclose_192, Digits) + "   " + DoubleToStr((l_iclose_192 - l_iopen_184) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_444);
               ObjectSet("OpnClos4", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos4", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos4", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 212) * Text_Size / 9);
               ObjectCreate("OpnClos5", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos5", "#3 Open " + DoubleToStr(l_iopen_168, Digits) + "  &  Close  " + DoubleToStr(l_iclose_176, Digits) + "   " + DoubleToStr((l_iclose_176 - l_iopen_168) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_440);
               ObjectSet("OpnClos5", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos5", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos5", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 224) * Text_Size / 9);
               ObjectCreate("OpnClos6", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos6", "#2 Open " + DoubleToStr(l_iopen_152, Digits) + "  &  Close  " + DoubleToStr(l_iclose_160, Digits) + "   " + DoubleToStr((l_iclose_160 - l_iopen_152) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_436);
               ObjectSet("OpnClos6", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos6", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos6", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 236) * Text_Size / 9);
               ObjectCreate("OpnClos7", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos7", "     Current Open Close", Text_Size, "Tahoma", Gray);
               ObjectSet("OpnClos7", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos7", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos7", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 250) * Text_Size / 9);
               ObjectCreate("OpnClos8", OBJ_LABEL, 0, 0, 0);
               ObjectSetText("OpnClos8", "#1 Open " + DoubleToStr(l_iopen_136, Digits) + "  &  Close  " + DoubleToStr(l_iclose_144, Digits) + "   " + DoubleToStr((l_iclose_144 - l_iopen_136) / Point, 0) +
                  "", Text_Size, "Tahoma", 3 * l_color_432);
               ObjectSet("OpnClos8", OBJPROP_CORNER, Text_Corner);
               ObjectSet("OpnClos8", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
               ObjectSet("OpnClos8", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 262) * Text_Size / 9);
               if (Show_Open_Close_Legend == TRUE) {
                  ObjectCreate("OpnClos9", OBJ_LABEL, 0, 0, 0);
                  ObjectSetText("OpnClos9", "     Color Legend", Text_Size, "Tahoma", Gray);
                  ObjectSet("OpnClos9", OBJPROP_CORNER, Text_Corner);
                  ObjectSet("OpnClos9", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
                  ObjectSet("OpnClos9", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 278) * Text_Size / 9);
                  ObjectCreate("OpnClos10", OBJ_LABEL, 0, 0, 0);
                  ObjectSetText("OpnClos10", "     Open > Close", Text_Size, "Tahoma", 3 * OpenClose_UP);
                  ObjectSet("OpnClos10", OBJPROP_CORNER, Text_Corner);
                  ObjectSet("OpnClos10", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
                  ObjectSet("OpnClos10", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 290) * Text_Size / 9);
                  ObjectCreate("OpnClos11", OBJ_LABEL, 0, 0, 0);
                  ObjectSetText("OpnClos11", "     Open < Close", Text_Size, "Tahoma", 3 * OpenClose_DN);
                  ObjectSet("OpnClos11", OBJPROP_CORNER, Text_Corner);
                  ObjectSet("OpnClos11", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
                  ObjectSet("OpnClos11", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 302) * Text_Size / 9);
                  ObjectCreate("OpnClos12", OBJ_LABEL, 0, 0, 0);
                  ObjectSetText("OpnClos12", "     Open = Close", Text_Size, "Tahoma", 3 * OpenClose_EQUAL);
                  ObjectSet("OpnClos12", OBJPROP_CORNER, Text_Corner);
                  ObjectSet("OpnClos12", OBJPROP_XDISTANCE, Shift_Text_Sideways + 5);
                  ObjectSet("OpnClos12", OBJPROP_YDISTANCE, (Shift_Text_UP_DN + 314) * Text_Size / 9);
               }
            }
         }
      }
   }
   if (Show_Pip_Values == TRUE) {
      ObjectDelete("HL_Pips");
      if (ObjectFind("HL_Pips") != 0) {
         ObjectCreate("HL_Pips", OBJ_TEXT, 0, iTime(NULL, TF, 0), l_ilow_16);
         ObjectSetText("HL_Pips", "       " + DoubleToStr((l_ihigh_8 - l_ilow_16) / Point, 0) + "", 10, "Tahoma Narrow", l_color_320);
      } else ObjectMove("HL_Pips", 0, iTime(NULL, TF, 0), l_ilow_16);
      ObjectDelete("HL_Pips1");
      if (ObjectFind("HL_Pips1") != 0) {
         ObjectCreate("HL_Pips1", OBJ_TEXT, 0, iTime(NULL, TF, 1), l_ilow_32);
         ObjectSetText("HL_Pips1", "       " + DoubleToStr((l_ihigh_24 - l_ilow_32) / Point, 0) + "", 10, "Tahoma Narrow", l_color_324);
      } else ObjectMove("HL_Pips1", 0, iTime(NULL, TF, 1), l_ilow_32);
      ObjectDelete("HL_Pips3");
      if (ObjectFind("HL_Pips3") != 0) {
         ObjectCreate("HL_Pips3", OBJ_TEXT, 0, iTime(NULL, TF, 2), l_ilow_48);
         ObjectSetText("HL_Pips3", "       " + DoubleToStr((l_ihigh_40 - l_ilow_48) / Point, 0) + "", 10, "Tahoma Narrow", l_color_328);
      } else ObjectMove("HL_Pips3", 0, iTime(NULL, TF, 2), l_ilow_48);
      ObjectDelete("HL_Pips4");
      if (ObjectFind("HL_Pips4") != 0) {
         ObjectCreate("HL_Pips4", OBJ_TEXT, 0, iTime(NULL, TF, 3), l_ilow_64);
         ObjectSetText("HL_Pips4", "       " + DoubleToStr((l_ihigh_56 - l_ilow_64) / Point, 0) + "", 10, "Tahoma Narrow", l_color_332);
      } else ObjectMove("HL_Pips4", 0, iTime(NULL, TF, 3), l_ilow_64);
      ObjectDelete("HL_Pips5");
      if (ObjectFind("HL_Pips5") != 0) {
         ObjectCreate("HL_Pips5", OBJ_TEXT, 0, iTime(NULL, TF, 4), l_ilow_80);
         ObjectSetText("HL_Pips5", "       " + DoubleToStr((l_ihigh_72 - l_ilow_80) / Point, 0) + "", 10, "Tahoma Narrow", l_color_336);
      } else ObjectMove("HL_Pips5", 0, iTime(NULL, TF, 4), l_ilow_80);
      ObjectDelete("HL_Pips6");
      if (ObjectFind("HL_Pips6") != 0) {
         ObjectCreate("HL_Pips6", OBJ_TEXT, 0, iTime(NULL, TF, 5), l_ilow_96);
         ObjectSetText("HL_Pips6", "       " + DoubleToStr((l_ihigh_88 - l_ilow_96) / Point, 0) + "", 10, "Tahoma Narrow", l_color_340);
      } else ObjectMove("HL_Pips6", 0, iTime(NULL, TF, 5), l_ilow_96);
      ObjectDelete("HL_Pips7");
      if (ObjectFind("HL_Pips7") != 0) {
         ObjectCreate("HL_Pips7", OBJ_TEXT, 0, iTime(NULL, TF, 6), l_ilow_112);
         ObjectSetText("HL_Pips7", "       " + DoubleToStr((l_ihigh_104 - l_ilow_112) / Point, 0) + "", 10, "Tahoma Narrow", l_color_344);
      } else ObjectMove("HL_Pips7", 0, iTime(NULL, TF, 6), l_ilow_112);
   }
}